/*! For license information please see uni-canvas-poster-sprite.js.LICENSE.txt */ ! function(e, t) {
	"object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define &&
		define.amd ? define([], t) : "object" == typeof exports ? exports.CanvasPosterSprite = t() : e
		.CanvasPosterSprite = t()
}(self, (function() {
	return (() => {
		"use strict";
		var e = {
				691: (e, t, n) => {
					n.r(t), n.d(t, {
						default: () => G
					});
					var r, i = {
							TASK: {
								CODE: 1001,
								MSG: "异步并行任务失败，获取图片资源失败！"
							},
							DRAW: {
								CODE: 1002,
								MSG: "canvas海报绘制失败!"
							},
							SAVE: {
								CODE: 1003,
								MSG: "海报保存为临时文件失败!"
							},
							GETIMG: {
								CODE: 1004,
								MSG: "图片资源下载到本地失败!"
							},
							TOBASE64: {
								CODE: 1005,
								MSG: "本地图片转换base64失败!"
							}
						},
						o = {
							line: "line",
							rect: "rect",
							circle: "circle",
							triangle: "triangle",
							polygon: "polygon"
						},
						a = {
							width: 640,
							height: 640,
							bgColor: "white",
							fileType: "jpeg",
							quality: 1,
							version: n(306).version,
							pics: [],
							texts: [],
							paths: {},
							callback: function(e, t) {}
						},
						s = {
							self: "",
							canvasId: ""
						},
						l = {
							appPlus: !1,
							pixelRatio: 2
						},
						c = (r = {}, ["String", "Object", "Number", "Array", "Undefined",
							"Function", "Null"
						].forEach((function(e) {
							r["is" + e] = function(t) {
								return Object.prototype.toString.call(t) ==
									"[object " + e + "]"
							}
						})), r);

					function u(e, t) {
						for (var n = 0; n < t.length; n++) {
							var r = t[n];
							r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r &&
								(r.writable = !0), Object.defineProperty(e, r.key, r)
						}
					}
					const f = function() {
						function e(t) {
							return function(e, t) {
								if (!(e instanceof t)) throw new TypeError(
									"Cannot call a class as a function")
							}(this, e), this.canvasApi = t || {}, this
						}
						var t, n;
						return t = e, (n = [{
							key: "triangle",
							value: function(e, t) {
								t.points && 0 != t.points.length ? t.points
									.length = 3 : t.points = [{
										x: 0,
										y: 0
									}, {
										x: 8,
										y: 8
									}, {
										x: 16,
										y: 0
									}], this.polygon(e, t)
							}
						}, {
							key: "circle",
							value: function(e, t) {
								this.rect(e, {
									x: t.x,
									y: t.y,
									r: t.r,
									w: 2 * t.r,
									h: 2 * t.r,
									type: t.type,
									color: t.color,
									angle: t.angle,
									callback: t.callback
								})
							}
						}, {
							key: "rect",
							value: function(e, t) {
								var n = this.canvasApi || {};
								e.save();
								var r = t.x || 0,
									i = t.y || 0,
									o = t.w || 0,
									a = t.h || 0,
									s = t.r || 0,
									l = t.callback || function(e) {},
									c = t.type || "stroke",
									u = t.angle || null;
								n.setFillStyle && n.setFillStyle(e, t.color ||
										"white"), n.setStrokeStyle && n
									.setStrokeStyle(e, t.color || "white");
								var f = /^\d+\.\d+$/;
								f.test(r) || (r += .5), f.test(i) || (i += .5),
									n.setLineWidth && n.setLineWidth(e, t
										.lineWidth || 1), u && (e.translate(r +
											.5 * o, i + .5 * a), e.rotate(u *
											Math.PI / 180), r = -.5 * o, i = -
										.5 * a), e.beginPath(), s > 0 ? (e
										.moveTo(r + s, i), e.lineTo(r + o - s,
											i), e.arc(r + o - s, i + s, s, -.5 *
											Math.PI, 0, !1), e.lineTo(r + o, i +
											a - s), e.arc(r + o - s, i + a - s,
											s, 0, .5 * Math.PI, !1), e.lineTo(
											r + s, i + a), e.arc(r + s, i + a -
											s, s, .5 * Math.PI, Math.PI, !1), e
										.lineTo(r, i + s), e.arc(r + s, i + s,
											s, Math.PI, 1.5 * Math.PI, !1)) : (e
										.moveTo(r, i), e.lineTo(r + o, i), e
										.lineTo(r + o, i + a), e.lineTo(r, i +
											a), e.lineTo(r, i)), e.clip(), e
									.closePath(), "stroke" == c ? e.stroke() : e
									.fill(), e.save(), l({
										x: r,
										y: i,
										w: o,
										h: a
									}), e.restore(), e.restore()
							}
						}, {
							key: "line",
							value: function(e, t) {
								var n = this.canvasApi || {};
								e.save();
								var r = t.x1 || 0,
									i = t.y1 || 0,
									o = t.x2 || 0,
									a = t.y2 || 0,
									s = /^\d+\.\d+$/;
								s.test(r) || (r += .5), s.test(i) || (i += .5),
									n.setLineWidth && n.setLineWidth(e, t
										.lineWidth || 1), n.setStrokeStyle && n
									.setStrokeStyle(e, t.color || "white"), n
									.setLineJoin && n.setLineJoin(e, t
										.lineJoin || "miter"), n.setLineCap && n
									.setLineCap(e, t.lineCap || "butt"), t
									.dash && n.setLineDash && n.setLineDash(e, t
										.dash, t.offset || 5), e.beginPath(), e
									.moveTo(r, i), e.lineTo(o, a), e
								.closePath(), e.stroke(), e.restore()
							}
						}, {
							key: "polygon",
							value: function(e, t) {
								var n = this.canvasApi || {};
								e.save();
								var r = t.type || "stroke",
									i = t.points || [];
								0 != i.length && (e.beginPath(), i.forEach((
										function(t, n) {
											0 == n && e.moveTo(t.x, t
												.y), e.lineTo(t.x, t.y)
										})), e.closePath(), n
									.setLineWidth && n.setLineWidth(e, t
										.lineWidth || 1), n.setFillStyle &&
									n.setFillStyle(e, t.color || "white"), n
									.setStrokeStyle && n.setStrokeStyle(e, t
										.color || "white"), "stroke" == r ?
									e.stroke() : e.fill(), e.restore())
							}
						}]) && u(t.prototype, n), e
					}();

					function p(e) {
						return "web" === e
					}

					function d(e, t) {
						var n = "14px Arial",
							r = /(\d+\.?\d*)/g,
							i = new RegExp("".concat(r.source, "px"), "g"),
							o = !p(e.__platform__),
							a = c.isNumber(t),
							s = c.isString(t);
						if (!t || !a && !s) return o ? 14 : n;
						if (o && a) return t;
						if (o && s) {
							var l = t.match(r);
							return l && l[0] ? Number(l[0]) : 14
						}
						if (!o && a) return "".concat(t, "px Arial");
						if (!o && s) {
							if (t.match(i)) return t;
							var u = t.match(r);
							return u && u[0] ? "".concat(u[0], "px Arial") : n
						}
					}

					function h(e, t) {
						for (var n = 0; n < t.length; n++) {
							var r = t[n];
							r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r &&
								(r.writable = !0), Object.defineProperty(e, r.key, r)
						}
					}
					const y = function() {
						function e(t) {
							return function(e, t) {
								if (!(e instanceof t)) throw new TypeError(
									"Cannot call a class as a function")
							}(this, e), this.canvasApi = t || {}, this
						}
						var t, n;
						return t = e, (n = [{
							key: "textAlign",
							value: function(e, t) {
								var n = d(e, t.font),
									r = this.canvasApi || {};
								e.save(), r.setFontSize && r.setFontSize(e, n),
									r.setFillStyle && r.setFillStyle(e, t
										.color || "black"), r.setTextBaseline &&
									r.setTextBaseline(e, t.baseline ||
									"middle");
								var i = t.x || 0,
									o = t.y || 0,
									a = t.w || 0,
									s = i,
									l = t.lineHeight || 20,
									c = t.angle || null,
									u = t.align || "left",
									f = t.text ? t.text.toString() : "",
									p = this.measureText(e, f, n);
								a > 0 && "center" == u ? s = i + .5 * (a - p) :
									a > 0 && "right" == u && (s = i + (a - p)),
									c ? (e.translate(s + .5 * p, o + .5 * l), e
										.rotate(c * Math.PI / 180), e.fillText(
											f, -.5 * p, -.5 * l)) : e.fillText(
										f, s, o), e.restore()
							}
						}, {
							key: "wordwrap",
							value: function(e, t) {
								var n = d(e, t.font),
									r = this.canvasApi || {};
								e.save(), r.setFontSize && r.setFontSize(e, n),
									r.setFillStyle && r.setFillStyle(e, t
										.color || "black"), r.setTextBaseline &&
									r.setTextBaseline(e, t.baseline ||
									"middle");
								var i = t.x || 0,
									o = t.y || 0,
									a = t.w || 0,
									s = t.lineHeight || 24,
									l = t.clamp || -1,
									c = "",
									u = [],
									f = t.text || "";
								f = f.toString().split("");
								for (var p = 0; p < f.length; p++) this
									.measureText(e, c, n) < a && this
									.measureText(e, c + f[p], n) <= a ? c += f[
										p] : (u.push(c), c = f[p]);
								u.push(c);
								var h = u.length;
								if (l > 0 && l < h)
									for (var y = 0; y < l; y++) {
										var v = u[y];
										y == l - 1 && (v = v.substring(0, v
												.length - 1) + "..."), e
											.fillText(v, i, o + (y + 1) * s)
									} else
										for (var b = 0; b < h; b++) e.fillText(
											u[b], i, o + (b + 1) * s);
								e.restore()
							}
						}, {
							key: "measureText",
							value: function(e, t) {
								var n = arguments.length > 2 && void 0 !==
									arguments[2] ? arguments[2] : 14;
								if (!t) return 0;
								if (e.measureText) {
									var r = e.measureText(t).width;
									if (r > 0) return r
								}
								var i = /(\d+\.?\d*)/g,
									o = n.toString().match(i),
									a = o && o[0] ? Number(o[0]) : 14;
								return width = t.toString().length * a, width
							}
						}]) && h(t.prototype, n), e
					}();

					function v(e, t) {
						var n = Object.keys(e);
						if (Object.getOwnPropertySymbols) {
							var r = Object.getOwnPropertySymbols(e);
							t && (r = r.filter((function(t) {
								return Object.getOwnPropertyDescriptor(e, t)
									.enumerable
							}))), n.push.apply(n, r)
						}
						return n
					}

					function b(e) {
						for (var t = 1; t < arguments.length; t++) {
							var n = null != arguments[t] ? arguments[t] : {};
							t % 2 ? v(Object(n), !0).forEach((function(t) {
								g(e, t, n[t])
							})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e,
								Object.getOwnPropertyDescriptors(n)) : v(Object(n)).forEach((
								function(t) {
									Object.defineProperty(e, t, Object
										.getOwnPropertyDescriptor(n, t))
								}))
						}
						return e
					}

					function g(e, t, n) {
						return t in e ? Object.defineProperty(e, t, {
							value: n,
							enumerable: !0,
							configurable: !0,
							writable: !0
						}) : e[t] = n, e
					}

					function m(e, t) {
						for (var n = 0; n < t.length; n++) {
							var r = t[n];
							r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r &&
								(r.writable = !0), Object.defineProperty(e, r.key, r)
						}
					}
					const w = function() {
						function e(t, n) {
							var r = n.platform,
								i = n.canvasApi,
								o = n.canvasCtxApi;
							if (function(e, t) {
									if (!(e instanceof t)) throw new TypeError(
										"Cannot call a class as a function")
								}(this, e), c.isObject(t)) return this.options = t || {}, this
								.__platform__ = r, this.drawPath = new f(o), this.drawText =
								new y(o), this.canvasApi = b(b({}, i), o), this
								.canvasResult = {
									hasEmit: !1,
									err: null,
									res: null
								}, this.context = {
									ctx: null,
									canvas: null
								}, this.resCallbacks = [], c.isFunction(this.options
									.callback) && this.resCallbacks.push(this.options
									.callback), this;
							console.error("参数错误，参数必须是对象！")
						}
						var t, n;
						return t = e, (n = [{
							key: "then",
							value: function(e) {
								return c.isFunction(e) && (this.resCallbacks
									.push(e), this.canvasResult.hasEmit &&
									e(this.canvasResult.err, this
										.canvasResult.res)), this
							}
						}, {
							key: "drawImg",
							value: function(e, t) {
								var n = this.drawPath || {},
									r = t.w || t.img.width,
									i = t.h || t.img.height;
								t.r || t.angle ? n.rect && n.rect(e, {
									x: t.x,
									y: t.y,
									w: r,
									h: i,
									r: t.r,
									angle: t.angle,
									callback: function(n) {
										e.drawImage(t.img, n.x, n.y,
											n.w, n.h)
									}
								}) : e.drawImage(t.img, t.x, t.y, r, i)
							}
						}, {
							key: "canvas",
							value: function() {
								var e, t = this,
									n = this.options,
									r = this.drawImg.bind(this),
									a = this.drawPath || {},
									s = this.drawText || {},
									l = this.canvasApi || {},
									u = this.__platform__,
									f = this.resCallbacks || [];

								function p(e, n) {
									f.forEach((function(t) {
										c.isFunction(t) && t(e, n)
									})), t.canvasResult = {
										err: e,
										res: n,
										hasEmit: !0
									}
								}

								function d(e) {
									var f = e.paths,
										d = void 0 === f ? {} : f,
										h = e.texts,
										y = void 0 === h ? [] : h,
										v = e.pics,
										g = void 0 === v ? [] : v,
										m = e.preloadPics,
										w = void 0 === m ? [] : m;
									if (l.createCanvasContext) {
										var x = l.createCanvasContext(n),
											S = x.ctx,
											_ = x.canvas;
										if (S.__platform__ = u, _.__platform__ =
											u, t.context.ctx = S, t.context
											.canvas = _, S.rect(0, 0, n.width, n
												.height), l.setFillStyle && l
											.setFillStyle(S, n.bgColor ||
												"white"), S.fill(), c.isArray(
											w) && w.length > 0)
											for (var T in w) r && r(S, w[T]);
										if ((c.isObject(d) ? Object
												.getOwnPropertyNames(d) : [])
											.length > 0)
											for (var O in d) {
												var P = d[O];
												for (var E in P) {
													var k = P[E],
														j = o[O];
													a[j] && a[j](S, k)
												}
											}
										if (c.isArray(g) && g.length > 0)
											for (var I in g) r && r(S, g[I]);
										if (c.isArray(y) && y.length > 0)
											for (var C in y) {
												var A = y[C];
												A.multiple && A.w ? s
													.wordwrap && s.wordwrap(S,
														A) : s.textAlign && s
													.textAlign(S, A)
											}
										l.canvasToTempFilePath && l
											.canvasToTempFilePath({
												ctx: S,
												opts: n,
												canvas: _,
												ERROR_TYPE: i,
												callback: function(e, t) {
													p(e, b(b({}, t), {}, {
														canvas: _
													}))
												}
											})
									}
								}
								c.isArray(n.pics) && n.pics.length > 0 ?
									function(e, t) {
										var n = {},
											r = {};
										if (0 != Object.getOwnPropertyNames(e)
											.length) {
											for (var i in e) n[i] = null, r[
											i] = {
												complate: !1
											};
											var o = function(e, i, o) {
												i ? t(i, null) : (r[e]
													.complate = !0, n[
													e] = o,
													function() {
														var e = !0;
														for (var t in r)
															if (!r[t]
																.complate
																) {
																e = !1;
																break
															} return e
													}() && t(null, n))
											};
											for (var i in e)(0, e[i])(o.bind(
												null, i))
										} else t(null, null)
									}((e = {}, n.pics.forEach((function(t, r) {
										var o = Math.random()
											.toString(16)
											.substr(2);
										e[o] = function(e) {
											l.getImageInfos &&
												l
												.getImageInfos({
													opts: n,
													ERROR_TYPE: i,
													src: t
														.src,
													callback: function(
														n,
														i
														) {
														n ? p(n,
																null) :
															e(null, {
																img: i
																	.path,
																x: t.x,
																y: t.y,
																w: t.w,
																h: t.h,
																r: t.r,
																zIndex: r,
																preload: t
																	.preload ||
																	!
																	1,
																angle: t
																	.angle
															})
													}
												})
										}
									})), e), (function(e, t) {
										if (e) p({
											code: i.TASK.CODE,
											msg: i.TASK.MSG,
											err: JSON.stringify(
												e),
											src: ""
										}, null);
										else {
											var r = [],
												o = [];
											for (var a in t) t[a]
												.preload ? o.push(t[
												a]) : r.push(t[a]);
											r.length > 0 && r.sort((
													function(e, t) {
														return e
															.zIndex -
															t.zIndex
													})), o.length > 0 &&
												o.sort((function(e, t) {
													return e
														.zIndex -
														t.zIndex
												})), d({
													pics: r,
													preloadPics: o,
													paths: n.paths,
													texts: n.texts
												})
										}
									})) : d({
										paths: n.paths,
										texts: n.texts
									})
							}
						}]) && m(t.prototype, n), e
					}();

					function x(e) {
						return (x = "function" == typeof Symbol && "symbol" == typeof Symbol
							.iterator ? function(e) {
								return typeof e
							} : function(e) {
								return e && "function" == typeof Symbol && e.constructor ===
									Symbol && e !== Symbol.prototype ? "symbol" : typeof e
							})(e)
					}

					function S(e) {
						return (S = "function" == typeof Symbol && "symbol" == typeof Symbol
							.iterator ? function(e) {
								return typeof e
							} : function(e) {
								return e && "function" == typeof Symbol && e.constructor ===
									Symbol && e !== Symbol.prototype ? "symbol" : typeof e
							})(e)
					}
					var _ = {
							__getImageInfo__: function() {},
							__createCanvasContext__: function() {},
							__canvasToTempFilePath__: function() {}
						},
						T = _,
						O = !1,
						P = {
							createCanvasContext: function(e) {
								if (T.__createCanvasContext__) {
									var t = T.__createCanvasContext__(e.canvasId, e.self);
									return {
										ctx: t,
										canvas: t
									}
								}
							},
							canvasToTempFilePath: function(e) {
								var t = e.ctx,
									n = e.opts,
									r = e.ERROR_TYPE,
									i = e.callback;
								if (T.__canvasToTempFilePath__) try {
									setTimeout((function() {
										t.draw(!0, (function() {
											T.__canvasToTempFilePath__({
												fileType: n
													.fileType ||
													"jpg",
												quality: n
													.quality ||
													1,
												canvasId: n
													.canvasId,
												success: function(
													e) {
													i(null,
														e)
												},
												fail: function(
													e) {
													i({
															desc: "海报保存失败.",
															err: JSON
																.stringify(
																	e
																	),
															code: r
																.SAVE
																.CODE,
															msg: r
																.SAVE
																.MSG,
															src: ""
														},
														null
														)
												}
											}, n.self)
										}))
									}), 250)
								} catch (e) {
									i({
										desc: "canva海报绘制失败.",
										err: JSON.stringify(e),
										code: r.DRAW.CODE,
										msg: r.DRAW.MSG,
										src: ""
									}, null)
								}
							},
							getImageInfos: function(e) {
								var t = e.src,
									n = e.ERROR_TYPE,
									r = e.callback;
								T.__getImageInfo__ && T.__getImageInfo__({
									src: t,
									fail: function(e) {
										r({
											desc: "图片下载失败.",
											err: JSON.stringify(e),
											code: n.GETIMG.CODE,
											msg: n.GETIMG.MSG,
											src: t
										}, null)
									},
									success: function(e) {
										r(null, e)
									}
								})
							}
						},
						E = {},
						k = !1,
						j = !0;

					function I(e) {
						return (I = "function" == typeof Symbol && "symbol" == typeof Symbol
							.iterator ? function(e) {
								return typeof e
							} : function(e) {
								return e && "function" == typeof Symbol && e.constructor ===
									Symbol && e !== Symbol.prototype ? "symbol" : typeof e
							})(e)
					}

					function C(e, t) {
						return (C = Object.setPrototypeOf || function(e, t) {
							return e.__proto__ = t, e
						})(e, t)
					}

					function A(e, t) {
						return !t || "object" !== I(t) && "function" != typeof t ? R(e) : t
					}

					function R(e) {
						if (void 0 === e) throw new ReferenceError(
							"this hasn't been initialised - super() hasn't been called");
						return e
					}

					function F(e) {
						return (F = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
							return e.__proto__ || Object.getPrototypeOf(e)
						})(e)
					}
					E.setLineWidth = function(e, t) {
						j ? e.setLineWidth(t) : e.lineWidth = t
					}, E.setLineCap = function(e, t) {
						j ? e.setLineCap(t) : e.lineCap = t
					}, E.setLineJoin = function(e, t) {
						j ? e.setLineJoin(t) : e.lineJoin = t
					}, E.setLineDash = function(e, t, n) {
						j ? e.setLineDash(t, n) : e.setLineDash(t)
					}, E.setFillStyle = function(e, t) {
						j ? e.setFillStyle(t) : e.fillStyle = t
					}, E.setStrokeStyle = function(e, t) {
						j ? e.setStrokeStyle(t) : e.strokeStyle = t
					}, E.setFontSize = function(e, t) {
						var n = d(e, t);
						j ? e.setFontSize(n) : e.font = n
					}, E.setTextBaseline = function(e, t) {
						j ? e.setTextBaseline(t) : e.textBaseline = t
					};
					var M, D = "uni-app";
					k ? console.error(
						"You have already set canvasCtxApiEnv and cannot change it.") : (j = !p(
							"uni-app"), k = !0), M = {
							__getImageInfo__: uni.getImageInfo,
							__createCanvasContext__: uni.createCanvasContext,
							__canvasToTempFilePath__: uni.canvasToTempFilePath
						}, O ? console.error(
							"You have already set canvasEnvApi and cannot change it.") : (T = M ||
							_, O = !0), P.getImageInfos = function(e) {
							var t = e.src,
								n = e.opts,
								r = e.ERROR_TYPE,
								i = e.callback;
							n && n.appPlus ? function(e, t, n) {
								if ("object" == ("undefined" == typeof plus ? "undefined" : S(
										plus))) {
									var r = "_downloads/image/pic_" + Math.random().toString(16)
										.substr(2) + "_.png";
									plus.downloader.createDownload(e, {
										method: "GET",
										filename: r
									}, (function(r, i) {
										var o;
										200 == i ? (o = r.filename, new Promise((
											function(e, t) {
												if ("object" === (
														"undefined" ==
														typeof window ?
														"undefined" : x(
															window)) &&
													"document" in window
													) {
													if ("function" ==
														typeof FileReader
														) {
														var n =
															new XMLHttpRequest;
														return n.open(
																"GET",
																o, !0),
															n
															.responseType =
															"blob", n
															.onload =
															function() {
																if (200 ===
																	this
																	.status
																	) {
																	var n =
																		new FileReader;
																	n.onload =
																		function(
																			t
																			) {
																			e(t.target
																				.result
																				)
																		},
																		n
																		.onerror =
																		t,
																		n
																		.readAsDataURL(
																			this
																			.response
																			)
																}
															}, n
															.onerror =
															t, void n
															.send()
													}
													var r = document
														.createElement(
															"canvas"),
														i = r
														.getContext(
															"2d"),
														a = new Image;
													return a.onload =
														function() {
															r.width = a
																.width,
																r
																.height =
																a
																.height,
																i
																.drawImage(
																	a,
																	0, 0
																	),
																e(r
																.toDataURL()),
																r
																.height =
																r
																.width =
																0
														}, a.onerror =
														t, void(a.src =
															o)
												}
												"object" !== (
													"undefined" ==
													typeof plus ?
													"undefined" : x(
														plus)) ?
												"object" === (
													"undefined" ==
													typeof wx ?
													"undefined" : x(wx)
													) && wx.canIUse(
														"getFileSystemManager"
														) ? wx
													.getFileSystemManager()
													.readFile({
														filePath: o,
														encoding: "base64",
														success: function(
															t) {
															e("data:image/png;base64," +
																t
																.data
																)
														},
														fail: function(
															e) {
															t(e)
														}
													}) : t(new Error(
														"not support"
														)): plus.io
													.resolveLocalFileSystemURL(
														function(e) {
															if (0 === e
																.indexOf(
																	"_www"
																	) ||
																0 === e
																.indexOf(
																	"_doc"
																	) ||
																0 === e
																.indexOf(
																	"_documents"
																	) ||
																0 === e
																.indexOf(
																	"_downloads"
																	))
																return e;
															if (0 === e
																.indexOf(
																	"file://"
																	))
																return e;
															if (0 === e
																.indexOf(
																	"/storage/emulated/0/"
																	))
																return e;
															if (0 === e
																.indexOf(
																	"/")
																) {
																var t =
																	plus
																	.io
																	.convertAbsoluteFileSystem(
																		e
																		);
																if (t !==
																	e)
																	return t;
																e = e
																	.substr(
																		1
																		)
															}
															return "_www/" +
																e
														}(o), (function(
															n) {
															n.file((function(
																	n
																	) {
																	var r =
																		new plus
																		.io
																		.FileReader;
																	r.onload =
																		function(
																			t
																			) {
																			e(t.target
																				.result
																				)
																		},
																		r
																		.onerror =
																		function(
																			e
																			) {
																			t(e)
																		},
																		r
																		.readAsDataURL(
																			n
																			)
																}),
																(function(
																	e
																	) {
																	t(e)
																})
																)
														}), (function(
														e) {
															t(e)
														}))
											}))).then((function(e) {
											n(null, {
												path: e
											})
										})).catch((function(r) {
											n({
												desc: "转base64图片出错.",
												err: JSON
													.stringify(
														r),
												code: t.TOBASE64
													.CODE,
												msg: t.TOBASE64
													.MSG,
												src: e
											}, null)
										})) : n({
											desc: "下载失败.",
											err: JSON.stringify(r),
											code: t.GETIMG.CODE,
											msg: t.GETIMG.MSG,
											src: e
										}, null)
									})).start()
								}
							}(t, r, i) : function(e, t, n) {
								uni.getImageInfo({
									src: e,
									fail: function(r) {
										n({
											desc: "图片下载失败.",
											err: JSON.stringify(r),
											code: t.GETIMG.CODE,
											msg: t.GETIMG.MSG,
											src: e
										}, null)
									},
									success: function(e) {
										n(null, e)
									}
								})
							}(t, r, i)
						};
					const G = function(e) {
						! function(e, t) {
							if ("function" != typeof t && null !== t) throw new TypeError(
								"Super expression must either be null or a function");
							e.prototype = Object.create(t && t.prototype, {
								constructor: {
									value: e,
									writable: !0,
									configurable: !0
								}
							}), t && C(e, t)
						}(i, e);
						var t, n, r = (t = i, n = function() {
							if ("undefined" == typeof Reflect || !Reflect.construct)
								return !1;
							if (Reflect.construct.sham) return !1;
							if ("function" == typeof Proxy) return !0;
							try {
								return Date.prototype.toString.call(Reflect.construct(
									Date, [], (function() {}))), !0
							} catch (e) {
								return !1
							}
						}(), function() {
							var e, r = F(t);
							if (n) {
								var i = F(this).constructor;
								e = Reflect.construct(r, arguments, i)
							} else e = r.apply(this, arguments);
							return A(this, e)
						});

						function i(e) {
							var t;
							if (function(e, t) {
									if (!(e instanceof t)) throw new TypeError(
										"Cannot call a class as a function")
								}(this, i), !c.isObject(e)) return console.error(
								"参数错误，参数必须是对象！"), A(t);
							var n = function(e) {
								for (var t = arguments.length, n = new Array(t > 1 ? t - 1 :
										0), r = 1; r < t; r++) n[r - 1] = arguments[r];
								var i = [].concat(n);
								return 0 == i.length || i.forEach((function(t, n) {
									for (var r in t) e[r] = t[r]
								})), e
							}({}, a, s, l, e);
							return (t = r.call(this, n, {
								platform: D,
								canvasApi: P,
								canvasCtxApi: E
							})).options = n, t.canvas(), A(t, R(t))
						}
						return i
					}(w)
				},
				306: e => {
					e.exports = JSON.parse(
						'{"name":"canvas-poster-sprite","version":"1.0.5","description":"A poster plugin that can draw texts, paths and pictures to canvas, and export picture data.","main":"dis/web-canvas-poster-sprite.js","directories":{"example":"examples"},"scripts":{"my-build":"node build/my-build.js","qq-build":"node build/qq-build.js","swan-build":"node build/swan-build.js","tt-build":"node build/tt-build.js","uni-build":"node build/uni-build.js","web-build":"node build/web-build.js","wx-build":"node build/wx-build.js","pack":"webpack --config webpack.config.js","build":"node --max_semi_space_size=64 build/build.js","test":"echo \\"Error: no test specified\\" && exit 1"},"keywords":["canvas","poster","sprite"],"author":"小小咖","email":"466102061@qq.com","license":"MIT","devDependencies":{"@babel/core":"^7.12.10","@babel/preset-env":"^7.12.11","babel-loader":"^8.2.2","chalk":"^4.1.0","ora":"^5.3.0","rimraf":"^3.0.2","webpack":"^5.17.0","webpack-cli":"^4.4.0"}}'
						)
				}
			},
			t = {};

		function n(r) {
			if (t[r]) return t[r].exports;
			var i = t[r] = {
				exports: {}
			};
			return e[r](i, i.exports, n), i.exports
		}
		return n.d = (e, t) => {
			for (var r in t) n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {
				enumerable: !0,
				get: t[r]
			})
		}, n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n.r = e => {
			"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol
				.toStringTag, {
					value: "Module"
				}), Object.defineProperty(e, "__esModule", {
				value: !0
			})
		}, n(691)
	})()
}));
